package com.mmp.main.entity;

import java.io.Serializable;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 * The persistent class for the job_order_spare_part database table.
 *
 */
@Entity
@Table(name = "job_order_spare_part")
@NamedQuery(name = "JobOrderSparePart.findAll", query = "SELECT j FROM JobOrderSparePart j")
public class JobOrderSparePart implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Basic(optional = false)
	@Column(name = "pk_id")
	private Integer pkId;

	private String description;

	private Float price;

	private Integer quantity;

	@Column(name = "total_price")
	private Float totalPrice;

	// bi-directional many-to-one association to JobOrder
	@ManyToOne
	@JoinColumn(name = "job_order_id")
	private JobOrder jobOrder;

	public JobOrderSparePart() {
	}

	public Integer getPkId() {
		return this.pkId;
	}

	public void setPkId(Integer pkId) {
		this.pkId = pkId;
	}

	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Float getPrice() {
		return this.price;
	}

	public void setPrice(Float price) {
		this.price = price;
	}

	public Integer getQuantity() {
		return this.quantity;
	}

	public void setQuantity(Integer quantity) {
		this.quantity = quantity;
	}

	public Float getTotalPrice() {
		return this.totalPrice;
	}

	public void setTotalPrice(Float totalPrice) {
		this.totalPrice = totalPrice;
	}

	public JobOrder getJobOrder() {
		return this.jobOrder;
	}

	public void setJobOrder(JobOrder jobOrder) {
		this.jobOrder = jobOrder;
	}

}
